
const path = require('path');
function resolve (dir) {
    return path.join(__dirname, dir)
}

module.exports = {
css: {
    loaderOptions: {
        css: {},
        postcss: {
            plugins: [
                require('postcss-px2rem')({
                    remUnit: 50
                })
            ]
        }
    }
},
chainWebpack: (config)=>{
    //修改文件引入自定义路径
    config.resolve.alias
        .set('@', resolve('src'))
        .set('assets', resolve('src/assets'))
        .set('base', resolve('src/base'))
        .set('components', resolve('src/components'))
        .set('router', resolve('src/router'))
        .set('store', resolve('src/store'))
        .set('pages', resolve('src/pages'))
}

};
